package com.ftg.learn.mapper;

import com.ftg.learn.entity.SysRole;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 描述
 *
 * @author 布衣
 * @date 2025/8/27
 */
@Mapper
public interface SysRoleMapper {


    List<SysRole> list(String roleName);

    @Insert("insert into sys_role(name,gmt_create,gmt_modified) values(#{name},#{gmtCreate},#{gmtModified})")
    int add(SysRole role);

    @Update("update sys_role set name=#{name},gmt_create=#{gmtCreate},gmt_modified=#{gmtModified} where id=#{id}")
    int update(SysRole role);

    @Delete("delete from sys_role where id=#{id}")
    int deleteById(@Param("id") Long id);

    Integer deleteByIds(List<Long> ids);
}
